Subject: Proposal for Return Codes 8/26/93 Background ---------- In the development of CPI-C Level 2, various architectures have introduced several new return codes, each specific to a particular architecture. To avoid proliferation of the return codes, we have surveyed all the return codes and derived the following guideline for defining new return codes: A return code is defined in accordance with the action the program will take once it receives the return code. With this guideline, we want to make best use of the existing return codes and introduce a new return code only when the program has to handle the return code differently than the existing ones. As a result, this proposal has eliminated the following return codes: - CM_JOIN_PENDING (OSI TP support) - CM_NO_OUTSTANDING_OPERATION, CM_TIMER_EXPIRED, CM_NON_BLOCKING_LEVEL_ MISMATCH (non-blocking) (Consolidation of full-duplex return codes will be completed later.) We have also identified those CRM-sensitive characteristic values. The proposal ensures that the program will set those values only for the same CRM type on a given conversation, but not for a different CRM type. Proposal -------- Terminology: A conversation is said to be using a CRM (SNA LU 6.2 or OSI TP) if the conversation has been allocated on that CRM type, or if the program has successfully set one of the following CRM-sensitive characteristic values or value pairs for the conversation: OSI TP-sensitive: - allocate_confirm(CM_ALLOCATE_CONFIRM) - transaction_control(CM_UNCHAINED_TRANSACTION) - prepare_data_permitted(CM_PREPARE_DATA_PERMITTED) - sync_level(CM_NONE) + deallocate_type(CM_DEALLOCATE_CONFIRM) - sync_level(CM_SYNC_POINT) + deallocate_type(CM_DEALLOCATE_CONFIRM) - sync_level(CM_SYNC_POINT_NO_CONFIRM) + deallocate_type(CM_DEALLOCATE_CONFIRM) - sync_level(CM_SYNC_POINT) + deallocate_type(CM_DEALLOCATE_FLUSH) - sync_level(CM_SYNC_POINT_NO_CONFIRM) + deallocate_type(CM_DEALLOCATE_FLUSH) - send_receive_mode(CM_HALF_DUPLEX) + sync_level(CM_SYNC_LEVEL_NO_CONFIRM) SNA LU 6.2-sensitive: - error_direction(CM_SEND_ERROR) - conversation_security_type(CM_SECURITY_AUTH_EVERY) - conversation_security_type(CM_SECURITY_MUTUAL) ================================================ Reasons for returning CM_PROGRAM_PARAMETER_CHECK ================================================ Confirm 1) send_receive_mode is not CM_HALF_DUPLEX. 2) sync_level is CM_NONE or CM_SYNC_POINT_NO_CONFIRM. Deallocate 1) deallocate_type is CM_DEALLOCATE_CONFIRM or CM_DEALLOCATE_FLUSH, transaction_control is CM_UNCHAINED_TRANSACTION, and the program is in the midst of a transaction. Deferred_Deallocate 1) The conversation is not using OSI TP CRM. 2) sync_level is not CM_SYNC_POINT or CM_SYNC_POINT_NO_CONFIRM. 3) The program is not the superior with respect to the specified conversation. Include_Partner_In_Transaction 1) transaction_control is not CM_UNCHAINED_TRANSACTION. 2) The program is not the superior with respect to the specified conversation. Prepare 1) sync_level is not CM_SYNC_POINT or CM_SYNC_POINT_NO_CONFIRM. 2) The conversation is using OSI TP CRM and the program is not the superior with respect to the conversation. Prepare_To_Receive 1) send_receive_mode is not CM_HALF_DUPLEX. Receive_Expedited_Data 1) The conversation is not using SNA LU 6.2 CRM. Request_To_Send 1) send_receive_mode is not CM_HALF_DUPLEX. Send_Expedited_Data 1) The conversation is not using SNA LU 6.2 CRM. Set_Allocate_Confirm (CM_ALLOCATE_CONFIRM) 1) The conversation is using SNA LU 6.2 CRM. Set_Begin_Transaction 1) transaction_control is not CM_UNCHAINED_TRANSACTION. 2) The program is not the superior with respect to the specified conversation. Set_Confirmation_Urgency 1) send_receive_mode is not CM_HALF_DUPLEX. 2) sync_level is not CM_CONFIRM or CM_SYNC_POINT. Set_Conversation_Security_Type 1) The conversation_security_type is set to CM_SECURITY_AUTH_EVERY or CM_SECURITY_MUTUAL and the conversation is not using SNA LU 6.2 CRM. Set_Error_Direction 1) The error_direction is set to CM_SEND_ERROR and the conversation is using OSI TP CRM. 2) send_receive_mode is not CM_HALF_DUPLEX. Set_Prepare_Data_Permitted 1) The prepare_data_permitted is set to CM_PREPARE_DATA_PERMITTED and the conversation is using SNA LU 6.2 CRM. 2) sync_level is not CM_SYNC_POINT or CM_SYNC_POINT_NO_CONFIRM. 3) The program is not the superior with respect to the specified conversation. Set_Prepare_To_Receive_Type 1) send_receive_mode is not CM_HALF_DUPLEX. Set_Processing_Mode 1) send_receive_mode is not CM_HALF_DUPLEX. 2) The program has chosen queue-level non-blocking for the conversation. // replacing CM_NON_BLOCKING_LEVEL_MISMATCH // Set_Queue_Callback_Function, Set_Queue_Processing_Mode 1) The program has chosen conversation-level non-blocking for the conversation. // replacing CM_NON_BLOCKING_LEVEL_MISMATCH // Set_Transaction_Control 1) The transaction_control is set tp CM_UNCHAINED_TRANSACTION and the conversation is using SNA LU 6.2 CRM. 2) sync_level is not CM_SYNC_POINT or CM_SYNC_POINT_NO_CONFIRM. Test_Request_To_Send_Received 1) send_receive_mode is not CM_HALF_DUPLEX. ============================================ Reasons for returning CM_PROGRAM_STATE_CHECK ============================================ Receive, Request_To_Send, Send_Error 1) The program has been asked by the partner program to join partner's transaction and the program has not done so. // replacing CM_JOIN_PENDING // Wait_For_Completion 1) There is no outstanding operation associated with any of the OOIDs specified in OOID_list. // replacing CM_NO_OUTSTANDING_OPERATION // ===================================== Reasons for returning CM_UNSUCCESSFUL ===================================== Wait_For_Completion 1) The specified timeout value has elapsed and none of the operations identified in OOID_list has completed. // replacing CM_TIMER_EXPIRED // Contact ------- Chung-Huy Chen (chunghuy@vnet.ibm.com)